//
//  BusinessTranscation.h
//  OnlineClinic
//
//  Created by lv jian on 11-11-19.
//  Copyright 2011年 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <CoreLocation/CoreLocation.h>
#import "Constants.h"
#import "SBJson.h"

#define NA_RELEASE_SAFELY(__POINTER) { [__POINTER release]; __POINTER = nil; }


@interface RequestEngine : NSObject<SBJsonStreamParserAdapterDelegate,SBJsonStreamParserDelegate> {
    
    id                          delegate;
    NSURLConnection             *theConnection;
    SBJsonStreamParser          *parser;
    SBJsonStreamParserAdapter   *adapter;
    SEL                         callbackAction;     //Callback action
}

@property (nonatomic,assign) id delegate;


/*
 * Map request
 */
-(void) mapInfos;

/*
 * Regist info
 */
- (void) registInfos;

/*
 * Regist request
 */
- (void) registWithName:(NSString *)a1 
                        a2:(NSString*)a2 
                        a3:(NSString*)a3 
                        a4:(NSString*)a4 
                        a5:(NSString*)a5 
                        a6:(NSString*)a6 
                        a7:(NSString*)a7;

/*
 * Contact us request
 */
- (void) contactusInfos;

/*
 * Contact us Info
 */
- (void) contactusWithName:(NSString *)a1 
                        a2:(NSString*)a2 
                        a3:(NSString*)a3 
                        a4:(NSString*)a4 
                        a5:(NSString*)a5 
                        a6:(NSString*)a6 
                        a7:(NSString*)a7;

/*
 *  Shop check request
 */
- (void) shopChecksInfos:(NSString *)q1 
                      a1:(NSString *)a1 
                      a2:(NSString *)a2 
                      a3:(NSString *)a3 
                      a4:(NSString *)a4 
                      a5:(NSString *)a5 
                      a0:(NSString *)a0;

/*
 *  query confirm
 */
- (void) queryEndInfos:(NSString *)q1 
                    a1:(NSString *)a1 
                    a2:(NSString *)a2 
                    a3:(NSString *)a3 
                    a4:(NSString *)a4 
                    a5:(NSString *)a5 
                    a0:(NSString *)a0;

/*
 * shop check(ATM or Cash)
 */
- (void) shopCheckMsgWithID:(NSString *)ID q1:(NSString *)q1 q2:(NSString *)q2;

/*
 *  Shopping car request
 */
- (void) shoppingCartInfos:(NSString *)q1;

/*
 *  Query request
 */
- (void) queryCartInfos:(NSString *)q1;

/*
 *  product list request
 */
- (void) productInfosWithPage:(int)nPage;

/*
 * detail view request
 */
- (void) detailInfos:(NSString *)ID;

/*
 *  Constructor
 */
- (id) initWithTarget:(id) target action:(SEL)action;

/*
 *  Shake hands with server
 */
- (void) shakeHandWithServer;

/**
 *  Retrieve home page infos
 */
- (void) homePageInfos;

/**
 *  Returns navigator page 
 */
- (void) navigatorInfos;

/**
 *  Return system inline infos
 */
- (void) systeminlineInfos;

/**
 *  Returns Login page infos
 */
- (void) loginInfos;

/**
 *  Retruns register infos
 */
- (void) registerInfos;

/**
 *  Find password infos
 */
- (void) findPasswordInfos;

/**
 *  Retrive password
 */
- (void) retrievePasswordWithMail:(NSString *) mainAddress;

/**
 *  Member home infos
 */
- (void) memHomeInfos;

/**
 *  System infos
 */
- (void) systemInfos;

/**
 *  Register member
 */
- (void) registerMemberWithUserName:(NSString *) username password:(NSString *) password;

/**
 *  Login to server
 */
- (void) loginWithUserName:(NSString *) username password:(NSString *) password;


/**
 *  Retrive lasted messages
 */
- (void) lastedMessages;

/**
 *  Get lasted message list
 */
- (void) lastedMessagesListByPage:(NSInteger) pageNum;

/**
 *  Reset password page infos
 */
- (void) resetPasswordPageInfo;

/**
 *  Reset password
 */
- (void) resetAccountPassword:(NSString *) accID oldPassword:(NSString *) oldPassword newPassword:(NSString *) newPassword;

/**
 *  Digit album page info
 */
- (void) digitAlbumPageInfo;

/**
 *  Digit album details
 */
- (void) digitAlbumDetailsInfoWithID:(NSString *) dID page:(NSInteger) page;

/**
 *  Digit album large image
 */
-(void) digitAlbumLargeImageWithID:(NSString*)c1;

/** 
 *  My Orders
 */
- (void)myOrdersWithID:(NSString *)ID;

/**
 *  My Orders View
 */
- (void)myOrderViewWithID:(NSString *)ID Q1:(NSString *)Q1;

/*
 *  My query 
 */
- (void)myQueryWithID:(NSString *)ID;


/*
 *  My query detail
 */
- (void)myQueryDetailWithID:(NSString *)ID Q1:(NSString *)Q1;

/**
 *  Digit note infos
 */
- (void) digitNoteInfos;

/**
 *  Digit note details
 */
- (void) digitNoteDetailsWithCategoryID:(NSString *) cid keyword:(NSString *) keyword page:(NSInteger) page;

/**
 *  Product infos
 */
- (void) productInfosWithID:(NSString *) pid;

/**
 *  Inquiry price infos
 */
- (void) inquiryPriceInfos;

/**
 *  Inquiry price details
 */
- (void) inquiryPriceDetailsWithCategoryID:(NSString *) cid keyword:(NSString *) keyword page:(NSInteger) page;

/**
 *  Inquiry price infos
 */
- (void) inquiryPriceInfosWithID:(NSString *) pid;

/**
 *  Online shopping infos
 */
- (void) onlineShoppingInfos;

/**
 *  Online Shopping details
 */
- (void) onlineShoppingDetailsWithCategoryID:(NSString *) cid keyword:(NSString *) keyword page:(NSInteger) page;

/**
 *  Online Shopping infos
 */
- (void) onlineShoppingInfosWithID:(NSString *) pid;



@end
